package com.ruoyi.fullminusgiveaway.service.impl;

import java.util.List;

import com.ruoyi.fullminusgiveaway.domain.Goods;
import com.ruoyi.fullminusgiveaway.domain.Vo.fullGoods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fullminusgiveaway.mapper.FullMinusGiveawayMapper;
import com.ruoyi.fullminusgiveaway.domain.FullMinusGiveaway;
import com.ruoyi.fullminusgiveaway.service.IFullMinusGiveawayService;

/**
 * 满减满送活动Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-14
 */
@Service
public class FullMinusGiveawayServiceImpl implements IFullMinusGiveawayService
{
    @Autowired
    private FullMinusGiveawayMapper fullMinusGiveawayMapper;

    /**
     * 查询满减满送活动
     *
     * @param id 满减满送活动主键
     * @return 满减满送活动
     */
    @Override
    public fullGoods selectFullMinusGiveawayById(Long id)
    {
        return fullMinusGiveawayMapper.selectFullMinusGiveawayById(id);
    }

    /**
     * 查询满减满送活动列表
     *
     * @param fullMinusGiveaway 满减满送活动
     * @return 满减满送活动
     */
    @Override
    public List<fullGoods> selectFullMinusGiveawayList(String goodsName, String shopName,String businessName)
    {
        return fullMinusGiveawayMapper.selectFullMinusGiveawayList( goodsName,  shopName, businessName);
    }

    /**
     * 新增满减满送活动
     *
     * @param fullMinusGiveaway 满减满送活动
     * @return 结果
     */
    @Override
    public int insertFullMinusGiveaway(fullGoods full)
    {
        return fullMinusGiveawayMapper.insertFullMinusGiveaway(full);
    }

    @Override
    public int selectAddGoodsName(String goodsName) {
        return fullMinusGiveawayMapper.selectAddGoodsName(goodsName);
    }

    /**
     * 修改满减满送活动
     *
     * @param fullMinusGiveaway 满减满送活动
     * @return 结果
     */
    @Override
    public int updateFullMinusGiveaway(fullGoods fullGoods)
    {
        return fullMinusGiveawayMapper.updateFullMinusGiveaway(fullGoods);
    }

    /**
     * 批量删除满减满送活动
     *
     * @param ids 需要删除的满减满送活动主键
     * @return 结果
     */
    @Override
    public int deleteFullMinusGiveawayByIds(Long[] ids)
    {
        return fullMinusGiveawayMapper.deleteFullMinusGiveawayByIds(ids);
    }

    /**
     * 删除满减满送活动信息
     *
     * @param id 满减满送活动主键
     * @return 结果
     */
    @Override
    public int deleteFullMinusGiveawayById(Long id)
    {
        return fullMinusGiveawayMapper.deleteFullMinusGiveawayById(id);
    }

    @Override
    public List<Goods> goodsList() {
        return fullMinusGiveawayMapper.goodsList();
    }
}
